<script setup lang="ts">
import { ref } from "vue";
defineOptions({
  name: ""
});

const hoverFirst = ref(true);
const hoverSecond = ref(false);
const hoverThird = ref(false);
const hoverFour = ref(false);

const mouseover = (index: number) => {
  if (index === 1) {
    hoverFirst.value = true;
    hoverSecond.value = false;
    hoverThird.value = false;
    hoverFour.value = false;
  } else if (index === 2) {
    hoverSecond.value = true;
    hoverFirst.value = false;
    hoverThird.value = false;
    hoverFour.value = false;
  } else if (index === 3) {
    hoverThird.value = true;
    hoverFirst.value = false;
    hoverSecond.value = false;
    hoverFour.value = false;
  } else if (index === 4) {
    hoverFour.value = true;
    hoverFirst.value = false;
    hoverSecond.value = false;
    hoverThird.value = false;
  }
};
</script>

<template>
  <div class="product-and-service">
    <div class="com-title mb55 mymb30">
      <p class="t1 aos-init aos-animate" data-aos="fade-up">产品与服务</p>
      <p class="t2 aos-init aos-animate" data-aos="fade-up">
        专业、完整、稳定的产品与服务
      </p>
    </div>

    <div class="h-swiper-container">
      <div class="h-swiper-wrapper">
        <div
          class="item swiper-slide"
          v-on:mouseover="mouseover(1)"
          :class="{ active: hoverFirst }"
        >
          <div class="item-container">
            <p class="title">数据安全</p>
            <p class="text">建立以“数据为中心”的防护体系</p>
            <p class="content">
              以韧性数据安全架构为技术理念，打造面向复杂数据资产、身份和事件的新一代数据安全管理平台，提供以数据安全分类分级为基础、数据安全能力联动的整体防护
            </p>
            <div class="info">
              <span>热门产品:</span>
              <div class="info-list">
                <a href="/date-security/DSM" class="info-item">
                  <span>新一代 数据安全管理平台</span>
                </a>
                <a href="/date-security/API" class="info-item">
                  <span>API安全</span>
                </a>
              </div>
            </div>
            <div class="btns">
              <a href="javascript:;" onclick="indexFreeUse(event);" class="btn">
                <span>免费试用</span>
                <div class="img">
                  <!-- <img src="/template/home/dytpl/static/img/23.png" alt="" /> -->
                </div>
              </a>
              <a
                href="javascript:;"
                onclick="lookDetail(event,'/date-security')"
                class="btn"
              >
                <span>查看详情</span>
                <div class="img">
                  <!-- <img src="/template/home/dytpl/static/img/23.png" alt="" /> -->
                </div>
              </a>
            </div>
          </div>
        </div>
        <div
          class="item swiper-slide"
          v-on:mouseover="mouseover(2)"
          :class="{ active: hoverSecond }"
        >
          <div class="item-container">
            <p class="title">运行安全</p>
            <p class="text">关注业务可用性和数据完整性</p>
            <p class="content">
              聚焦用户业务连续性和数据完整性，实现容灾状态可感知，灾备演练可掌控、灾难切换可指挥。同时，结合运维大数据和AI分析模型，实现数据库运行状态预警、问题智能定位、故障快速自愈
            </p>
            <div class="info">
              <span>热门产品:</span>
              <div class="info-list">
                <a href="/operation-security/OSM" class="info-item">
                  <span>数据库运行安全管理平台</span>
                </a>
                <a href="/operation-security/DRCC" class="info-item">
                  <span>新一代 灾备一体化平台</span>
                </a>
              </div>
            </div>
            <div class="btns">
              <a href="javascript:;" onclick="indexFreeUse(event);" class="btn">
                <span>免费试用</span>
                <div class="img">
                  <!-- <img src="/template/home/dytpl/static/img/23.png" alt="" /> -->
                </div>
              </a>
              <a
                href="javascript:;"
                onclick="lookDetail(event,'/operation-security')"
                class="btn"
              >
                <span>查看详情</span>
                <div class="img">
                  <!-- <img src="/template/home/dytpl/static/img/23.png" alt="" /> -->
                </div>
              </a>
            </div>
          </div>
        </div>
        <div
          class="item swiper-slide"
          v-on:mouseover="mouseover(3)"
          :class="{ active: hoverThird }"
        >
          <div class="item-container">
            <p class="title">数据流动</p>
            <p class="text">让数据按需、安全地自由流动</p>
            <p class="content">
              数据只有流动才会创造更大价值，实现数据按需、安全地自由流动是数字化时代的刚需，随着云的出现，数据流动的形态将愈加复杂。美创聚焦“数据”18年，全新推出数据流动业务，帮助客户建立数据流动网络，实现数据实现按需流动，同时，数据脱敏、水印等流动安全技术，让数据在流动网络中安全流动。
            </p>
            <div class="info">
              <span>热门产品:</span>
              <div class="info-list">
                <a href="/date-flow/DSP" class="info-item">
                  <span>数据流动平台</span>
                </a>
              </div>
            </div>
            <div class="btns">
              <a href="javascript:;" onclick="indexFreeUse(event);" class="btn">
                <span>免费试用</span>
                <div class="img">
                  <!-- <img src="/template/home/dytpl/static/img/23.png" alt="" /> -->
                </div>
              </a>
              <a
                href="javascript:;"
                onclick="lookDetail(event,'/date-flow')"
                class="btn"
              >
                <span>查看详情</span>
                <div class="img">
                  <!-- <img src="/template/home/dytpl/static/img/23.png" alt="" /> -->
                </div>
              </a>
            </div>
          </div>
        </div>
        <div
          class="item swiper-slide"
          v-on:mouseover="mouseover(4)"
          :class="{ active: hoverFour }"
        >
          <div class="item-container">
            <p class="title">安全运维服务</p>
            <p class="text">高效敏捷的专家级支撑服务</p>
            <p class="content">
              美创科技致力于打造最佳服务模式，通过十余年的服务经验积累，提供安全治理咨询、安全建设、安全运营、数据运维、安全运维等服务，广泛获得业界权威认可
            </p>
            <div class="info">
              <span>热门产品:</span>
              <div class="info-list">
                <a
                  href="/security-and-OM-services/DSG-service"
                  class="info-item"
                >
                  <span>数据安全治理咨询服务</span>
                </a>
                <a
                  href="/security-and-OM-services/DCG-service"
                  class="info-item"
                >
                  <span>数据分类分级咨询服务</span>
                </a>
              </div>
            </div>
            <div class="btns">
              <a href="javascript:;" onclick="indexFreeUse(event);" class="btn">
                <span>免费试用</span>
                <div class="img">
                  <!-- <img src="/template/home/dytpl/static/img/23.png" alt="" /> -->
                </div>
              </a>
              <a
                href="javascript:;"
                onclick="lookDetail(event,'/security-and-OM-services')"
                class="btn"
              >
                <span>查看详情</span>
                <div class="img">
                  <!-- <img src="/template/home/dytpl/static/img/23.png" alt="" /> -->
                </div>
              </a>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<style lang="scss" scoped>
.product-and-service {
  padding: 50px 0;
  box-shadow: 0 -10px 20px rgba(18, 7, 7, 0.06),
    0 10px 20px rgba(18, 7, 7, 0.06);
}
.com-title {
  color: #222;
  text-align: center;
  // margin: 50px 0;
  .t1 {
    font-size: 50px;
    line-height: 50px;
  }

  .t2 {
    font-size: 36px;
    line-height: 36px;
    margin-top: 18px;
  }
}
.h-swiper-container {
  width: 88%;
  margin: 0 5%;
  .h-swiper-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-transition-property: -webkit-transform;
    transition-property: -webkit-transform;
    -o-transition-property: transform;
    transition-property: transform;
    transition-property: transform, -webkit-transform;
    -webkit-box-sizing: content-box;
    box-sizing: content-box;
    justify-content: space-between;
  }
  .item {
    width: 16%;
    margin: 10px;
    flex-shrink: 0;
    height: 404px;
    border-radius: 5px;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100% 100%;
    /* transition: width .6s; */
    cursor: pointer;
    padding: 63px 1.48% 72px;
    overflow: hidden;
    position: static;

    .item-container {
      display: flex;
      flex-direction: column;
      height: 100%;
    }

    .title {
      font-size: 24px;
      margin-bottom: 18px;
      color: white;
    }

    .text {
      font-size: 16px;
      line-height: 22px;
      color: #fff;
      width: 85%;
    }

    .content {
      font-size: 16px;
      line-height: 24px;
      color: #333;
      display: none;
      text-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
    }

    .info {
      display: none;
      font-size: 16px;
      margin-top: auto;
      margin-bottom: 35px;
    }

    .btns {
      display: none;
    }

    .info > span {
      font-weight: bold;
      margin-right: 20px;
      line-height: 25px;
      flex-shrink: 0;
    }
  }
  .item:nth-child(1) {
    background: url("@/views/haohan/product/asset/1.jpeg");
    background-size: cover;
  }
  .item:nth-child(2) {
    background: url("@/views/haohan/product/asset/2.jpeg");
    background-size: cover;
  }
  .item:nth-child(3) {
    background: url("@/views/haohan/product/asset/3.jpeg");
    background-size: cover;
  }
  .item:nth-child(4) {
    background: url("@/views/haohan/product/asset/1.jpeg");
    background-size: cover;
  }

  .item:last-child {
    margin-right: 0;
  }

  .item.active {
    background-image: url(./asset/img4.jpg) !important;
    /* background-size: auto 100%; */
    background-size: cover;
    background-position: right center;
    width: 400px;
    color: #333;
    border: solid 1px #e6e6e6;
    .item-container {
      position: absolute;
      height: 369px;
      width: 380px;
    }

    .title {
      color: black;
    }

    .text {
      display: none;
    }

    .content {
      display: block;
    }
  }
}
</style>
